Command Line "edit"
Greetings, I used to use "edit" from the command line, but when I try to edit a file from the command line from a 64-bit version of Windows 7 I get a message saying "'edit' is not recognized as an internal or external command, operable program or batch file." Is there a 64-bit version of the "edit" command line utility? Thanks, Shane.Windows 7 Home Premium 32-bit; Internet Explorer 8.0.7600.16385
January 28th, 2011 9:24pm

Edit.com is/was a 16-bit program originally from DOS, so it would not work for that reason in 64 bit Windows. You might be able to work around by using Notepad, which is also a plain text editor. If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2011 11:35pm

Try using notepad instead EG notepad filename.ext
January 28th, 2011 11:35pm

I finally figured out that I can use Notepad, but it has to be run as an administrator, otherwise it doesn't work. I'm trying to edit the %windir%\system32\drivers\etc\hosts file. Shane.Windows 7 Home Premium 32-bit; Internet Explorer 8.0.7600.16385
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2011 5:19am

I just right-click the hosts file and choose open, or drag-drop it into an already-opened Notebad window. It never complains that I need to be an admin. I am one, but it never even asks for elevation (must be doing so silently). I've noticed if you're doing it from the command prompt, the prompt does have to be running in an admin context. That's easy to do if you type 'cmd' into the Start menu then hit Ctrl-Shift-Enter. If you need to do this often, I'd suggest putting a link on your desktop (or somewhere) to this path: notepad.exe "C:\Windows\System32\drivers\etc\hosts" I was going to suggest editing the properties of the shortcut to force it to run elevated, but for me, using this shortcut never prompts for admin credentials or tries to elevate. If it doesn't work for you, you could probably run this path, although it'd prompt for your password every time you open it: runas /user:computer\user "notepad.exe C:\Windows\System32\drivers\etc\hosts" replace "computer" and "user" with your computer name and user name, of course If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!
January 30th, 2011 10:48am

cShane wrote: >I'm trying to edit the %windir%\system32\drivers\etc\hosts file. Do you have Administrator access? If not, you can not alter the HOSTS file. I like a program called Hostsman, that makes managing HOSTS a snap. -- G. Morgan
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2011 8:07pm

I have administrator access. I didn't realise initially that I had to elevate my privileges in order to edit the hosts file. Shane.Windows 7 Home Premium 32-bit; Internet Explorer 8.0.7600.16385
January 30th, 2011 9:12pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics